A number of different methods and systems are known in the art for creating depth maps. In the present patent application and in the claims, the terms “depth map” and “3D map” are used interchangeably to refer to a representation of a scene as a two-dimensional matrix of pixels, in which each pixel corresponds to a respective location in the scene and has a respective pixel value indicative of the distance from a certain reference location to respective scene location. In other words, the depth map has the form of an image in which the pixel values indicate topographical information, rather than brightness and/or color of the objects in the scene.
Depth maps may be created, for example, by detection and processing of an image of an object onto which a pattern is projected, such as a laser speckle pattern as described in PCT International Publication WO 2007/043036 A1, whose disclosure is incorporated herein by reference. As another example, U.S. Patent Application Publication 2008/0240502, whose disclosure is incorporated herein by reference, describes apparatus for mapping an object using an illumination assembly, which includes a transparency containing a fixed pattern of spots and projects the pattern onto an object. An image capture assembly captures an image of the pattern that is projected onto the object. A processor processes the image captured by the image capture assembly so as to reconstruct a 3D map of the object.